import { createApp } from 'vue'
import './style.css'
// el ui 导入
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// windi 引入
import 'virtual:windi.css'
// router 的引入
import {router}  from './router'
// pinia
import { createPinia } from 'pinia'
import piniaPluginPersist from 'pinia-plugin-persist'   //引入pinia数据持久化插件
// 进入 全局前置路由守卫
import '@/router/promission'

import "nprogress/nprogress.css"

import App from './App.vue'

const app = createApp(App)
// router
app.use(router)
// el
app.use(ElementPlus)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
// pinia
app.use(createPinia().use(piniaPluginPersist))  //安装插件

app.mount('#app')
